package usf.vend.a.bull;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import usf.vend.a.bull.db.DBUpdater;

public class VendabullActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        Button mapButton, shareButton, aboutButton;
        
        mapButton = (Button)findViewById(R.id.button1);
        mapButton.setOnClickListener(new OnClickListener()
        {
        	public void onClick(View current)
        	{
        	Intent mapIntent = new Intent(current.getContext(), GMapActivity.class);
        	startActivity(mapIntent);
        	}
        });
        
        shareButton = (Button)findViewById(R.id.shareButton);
        shareButton.setOnClickListener(new OnClickListener()
        {
        	public void onClick(View current)
        	{
        	Intent shareInfo = new Intent(Intent.ACTION_SEND);
        	shareInfo.setType("text/plain");
        	shareInfo.putExtra(Intent.EXTRA_TEXT, "Check out this app, Vendabull!\nrpobrien.myweb.usf.edu/Android/PA7");
        	startActivity(Intent.createChooser(shareInfo, "Choose how to share:"));
        	}
        });
        
        aboutButton = (Button) findViewById(R.id.aboutButton);
        aboutButton.setOnClickListener(new OnClickListener()
        {
        	public void onClick(View current)
        	{
        		Intent aboutIntent = new Intent(current.getContext(), AboutActivity.class);
        		startActivity(aboutIntent);
        	}
        });
    }    
}
